package Factory.factory;

import Factory.interfaces.Pizza;
import Factory.product.*;

/**
 * @Author: pengzx
 * @Description:
 * @Date: 15:31 2017/9/7
 * @Modified by: 1.0
 */
public class ChicagoPizzsaFactory {
    public static Pizza createPizza(String type){
        Pizza pizza = null;
        if (type.equals("cheese")){
            pizza = new ChicagoStyleCheesePizza();
        }
        if(type.equals("clam")){
            pizza = new ChicagoStyleClamPizza();
        }
        if (type.equals("pepperoni")){
            pizza = new ChicagoStylePepperoniPizza();
        }
        if (type.equals("veggie")){
            pizza = new ChicagoStyleVeggiePizza();
        }
        return pizza;
    }
}
